{include file='public/head' /}
<body>
{include file='public/menu' /}
<div class="project-center">
    <img id="banner" src="/static/hry/images/project.jpg" alt="" style="width: 100%">
    <div class="wrap">
        <div class="guide">
            <div class="left">
                <div class="p1">
                    <span>项目状态：</span>
                    <div class="status">
                        {foreach name="StatusList" item="vo" key="k"}
                        <a {if condition="$status eq $k" }class="ac" {/if}
                        href="{:url('Project/index',['status'=>$k])}">{$vo}</a>
                        {/foreach}
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        {if condition="$dataList->isEmpty()"}
        		<div style="width:100%;text-align:center;padding-top:5%;">
        			<img src="__static__/hry/images/nodata.png" style="width:50%" />
        			<p style="color:#999">暂无此类项目~</p>
        		</div>
        		{/if}
        <div class="list">
            {volist name="dataList" id="vo"}
            {if $vo.id == 35 || $vo.id == 30 || $vo.id == 36 || $vo.id == 47}
            <a href="{:url('Project/detail',array('id'=>$vo.id))}">
                <div class="pic"><img src=""
                                      alt="">
                    <div></div>
                </div>
                <div class="info">
                    <div class="left">XXX</div>
                    <div class="right">XXX</div>
                </div>
                <div class="tabs">

                </div>
                <progress value="0" max="{$vo.target_code}"></progress>
                <div class="add">
                    <div>
                        <span>目标金额</span><br>
                        ￥ {$vo.target_code}
                    </div>
                    <div>
                        <span>已筹金额</span><br>
                        <p>￥ {:GetProjectBar($vo.id)}</p>
                    </div>
                    <div>
                        <span>剩余时间</span><br>
                        {if $vo.status >= 3}0天0时0分{else /}{:OverTime($vo.end_time)}{/if}
                    </div>
                </div>
            </a>
            {else}

            {if condition=" (session('UID')) AND (session('isCheck') neq 1 )"}
            <a href="javascript:void(0)" onclick="head_auth_block_show()">
            {else}
            <a href="{:url('Project/detail',array('id'=>$vo.id))}">
            {/if}

                <div class="pic"><img src="{$vo.picture|default='/static/global/face/no-picture.jpg'}"
                                      alt="{$vo.project_name}">
                    {if $vo.status >= 3}
                    <div id='isCompelete'></div>
                    {elseif $vo.status eq -1 }
                    <div id='isEnd'></div>
                    {elseif $vo.status eq 1 }
                    <div id='isPreheat'></div>
                    {elseif $vo.status eq 2 }
                    <div id='isConfirm'></div>
                    {/if}
                </div>
                <div class="info">
                    <div class="left">{$vo.project_name}</div>
                    <div class="right">{$vo.company_name}</div>
                </div>
                <div class="tabs">
                    {:newGetTags($vo.tags)}
                </div>
                <progress value="{:GetProjectBar($vo.id)}" max="{$vo.target_code}"></progress>
                <div class="add">
                    <div>
                        <span>目标金额</span><br>
                        ￥ {$vo.target_code}
                    </div>
                    <div>
                        <span>已筹金额</span><br>
                        <p>￥ {:GetProjectBar($vo.id)}</p>
                    </div>
                    <div>
                        <span>剩余时间</span><br>
                        {if $vo.status >= 3}0天0时0分{else /}{:OverTime($vo.end_time)}{/if}
                    </div>
                </div>
            </a>
            {/if}
            {/volist}
            <div class="clear"></div>
        </div>
        <div id="pages">
            {$dataList->render()}
        </div>
    </div>
</div>
{include file="public/foot"}
</body>
{include file='public/load_bottom' /}
<script src="__static__/hry/js/scroll.js"></script>
<script>
    $(function () {
        statusChoice()
        $('.list .tabs span:empty').remove();
        let scrollToHeight = $("#banner").height()+ 110;
        roll("/project/index",scrollToHeight);
    });

    function statusChoice() {
        $('#status').mouseenter(function () {
            $(this).addClass('acright')
            $(this).find('.hide').slideDown(400)
        })
        $(window).scroll(function () {
            $('#status').removeClass('acright')
            $('#status').find('.hide').slideUp(400)
        })
    }
</script>
</html>